package com.azt.api.dto;

import java.math.BigDecimal;
import java.util.List;

/**
 * 创建采购预算
 * Created by 张栋 on 2016/9/2017:09
 */
public class EnqBgetPchaseCompany {
    /**
     * 公司名称
     */
   private String companyName;

    private Integer companyId;

    private Integer quoteid;

    private Integer categorySId;

    private List<Double> price;

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public List<Double> getPrice() {
        return price;
    }

    public void setPrice(List<Double> price) {
        this.price = price;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public Integer getQuoteid() {
        return quoteid;
    }

    public void setQuoteid(Integer quoteid) {
        this.quoteid = quoteid;
    }

    public Integer getCategorySId() {
        return categorySId;
    }

    public void setCategorySId(Integer categorySId) {
        this.categorySId = categorySId;
    }

    public Double  getTotalPrice(){
        BigDecimal total = new BigDecimal(0);
        for (Double d:price){
            if(d!=null){
                BigDecimal b = new BigDecimal(d);
                total = total.add(b);
            }
        }
        return total.doubleValue();
    }

}
